﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class UserControl_PersonalInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
//        if (Request["TenDangNhap"] != null)
//        {
//            LinQ_RaoVatDataContext linQ = new LinQ_RaoVatDataContext();
//            var query = from nguoidung in linQ.NGUOI_DUNGs
//                        where nguoidung.TenDangNhap ==
//                            Request["TenDangNhap"]
//                        select nguoidung;
// 
//            if(query.Count() == 0 )
//            {
//                Response.Write("Không có người dùng này");
//            }
//            else{
//                if(query.First().Deleted != 0)
//                {
//                    Response.Write("Tài khoản đã bị xóa");
//                }
//                else{
//                   
//                }
//            }
//        }
    }

//     protected void LinkButton1_Click(object sender, EventArgs e)
//     {
//         NGUOI_DUNG nd = new NGUOI_DUNG();
//         LinQ_RaoVatDataContext linQ = new LinQ_RaoVatDataContext();
//         nd = linQ.NGUOI_DUNGs.Single(p => p.TenDangNhap == Request["TenDangNhap"]);
// 
// 
//     }
//     protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
//     {
//         LinQ_RaoVatDataContext linQ = new LinQ_RaoVatDataContext();
//         NGUOI_DUNG nd = (NGUOI_DUNG)linQ.NGUOI_DUNGs.Single(p => p.SoCMND == e.NewValues["SoCMND"]);
// 
//         if (nd == null)
//         {
// 
//         }
//         else if (nd.TenDangNhap.CompareTo(e.OldValues["TenDangNhap"].ToString()) != 0)
//         {
//             return;
//         }
//     }
}
